<template>
<div class="ui-menu">
    <UiMenu :menu-list="list" @handle-jump="jump"/>
</div>
<div class="ui-content">
    <div class="ui-page"><router-view/></div>
</div>
</template>

<script setup>
import UiMenu from './components/menu/menu.vue'
import {useRouter} from 'vue-router'
const router = useRouter()
const list = router.options.routes
const jump = (e) => router.push(e.path)
</script>

<style>
#app{
    display: flex;
    height: 100vh;
}
.ui-menu{
    width: 250px;
    margin-left: 80px;
    height: 100vh;
    overflow: auto;
}
.ui-content{
    flex: 1;
    padding: 0 40px;
    height: 100vh;
    overflow-y: auto;
}
.ui-page{
    padding: 40px 0;
    width: 100%;
    max-width: 1000px;
}
code{
    padding: 15px;
    background: #f5f2f0;
    display: block;
    color: #65bbf5;
    margin: 20px 0;
}
ul, li {
    list-style-type: none;
    padding: 0;
}
</style>
